//类
    /*class 类名{//类名用大驼峰
        //属性(成员变量 字段)

        //行为(成员方法)
    }*/
class Dog {
    //属性
    public String name;
    public String color;
    public double weight;

    //行为
    public void walk() {
        System.out.println(name + "在走");
    }

    public void eat(String food) {
        System.out.println(name + "吃了一个" + food);
    }
    public void show(){
        System.out.println(name+"color: "+color+"weight: "+weight);
    }
}



public class Test {

    public static void main1(String[] args) {
        //通过new 关键字来实例化类
        Dog dog1 = new Dog();
        dog1.name="大黄";
        dog1.color="黄色";
        dog1.weight=5.5;

        dog1.show();//大黄color: 黄色weight: 5.5
        dog1.eat("骨头");//大黄吃了一个骨头
        dog1.walk();//大黄在走

    }
}


